﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SuperX.Common.Scheduler
{
    // 
    public class SchedulerSetting
    {
        // 
        public SchedulerPattern DispatcherPattern { get; set; } = SchedulerPattern.Timing;

        // 
        public bool IsUseAbsTime { get; set; }

        // 
        public DateTime AbsTime { get; set; } = DateTime.MinValue;

        //
        public double DeadZone { get; set; }

        // 
        public int Interval { get; set; } = 1000;

        // 
        public bool IsStateRecord { get; set; }

        // 
        public void Clone(SchedulerSetting setting)
        {
            setting.DispatcherPattern = this.DispatcherPattern;
            setting.Interval = this.Interval;
            setting.DeadZone = this.DeadZone;
            setting.IsUseAbsTime = this.IsUseAbsTime;
            setting.AbsTime = this.AbsTime;
        }
    }
}
